<html lang="en" class="h-100">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title> {{ title }}</title>
    <link rel="shortcut icon" type="image/ico" href="/static/favicon.ico"/>
    <link href="/static/bootstrap@4.3.1/bootstrap.min.css" rel="stylesheet">
    <link href="/static/fontawesome@5.8.2/all.min.css" rel="stylesheet">
    <link href="/static/toastr@2.1.3/toastr.min.css" rel="stylesheet">
    {% block head %}
    {% endblock %}
    <style>

        .footer {
            background-color: #f5f5f5;
        }

        .footer > .container {
            padding-right: 15px;
            padding-left: 15px;
        }

        code {
            font-size: 80%;
        }
    </style>
</head>
<body class="d-flex flex-column h-100">
<!--[if IE]>
<div class="alert alert-danger" role="alert">请在谷歌浏览器中访问该网站!</div><![endif]-->
<header>
    <nav class="navbar navbar-expand-lg navbar-dark bg-dark">
        <div class="container">
            <a class="navbar-brand" href="/">
                <img src="/static/favicon.ico" width="30" height="30" class="d-inline-block align-top" alt="">
                {{ title }}
            </a>
            <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExample07"
                    aria-controls="navbarsExample07" aria-expanded="false" aria-label="Toggle navigation">
                <span class="navbar-toggler-icon"></span>
            </button>

            <div class="collapse navbar-collapse" id="navbarsExample07">
                <ul class="navbar-nav mr-auto">
                    <li class="nav-item active">
                        <a class="nav-link" href="/">主页 <span class="sr-only">(current)</span></a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link active" href="{{ url_for('log_index') }}">日志查看</a>
                    </li>
                </ul>
                <ul class="nav navbar-nav navbar-right">
                    {% if current_user.is_authenticated and request.path != url_for('index') %}
                    <li class="nav-item active">
                        <span class="navbar-text text-success">欢迎: {{ current_user.account }}</span>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="{{ url_for('logoff') }}" role="button">
                            注销<i class="fas fa-sign-out-alt"></i>
                        </a>
                    </li>
                    {% endif %}
                </ul>
            </div>
        </div>
    </nav>
</header>
<main role="main" class="flex-shrink-0 mt-5">
    <div class="container">
        {% block main %}
        {% endblock %}
    </div>
</main>
<footer class="footer mt-auto py-3">
    <div class="container text-center">
        <span class="text-muted">{{ copyright }}</span>
    </div>
</footer>

<script src="/static/jquery@3.4.1/jquery.min.js"></script>
<script src="/static/bootstrap@4.3.1/bootstrap.min.js"></script>
<script src="/static/toastr@2.1.3/toastr.min.js"></script>
{% block script %}
{% endblock %}
</body>
</html>